package org.jeecg.modules.extbpm.listener.service;


import lombok.extern.slf4j.Slf4j;
import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.Expression;
import org.activiti.engine.delegate.JavaDelegate;

/**
* @Description: 流程服务节点
* 参考： https://blog.csdn.net/shirdrn/article/details/6270506
*        https://www.iteye.com/blog/topmanopensource-1315238
* @author: scott
* @date: 2020/3/30 19:58
*/
@Slf4j
public class ServiceTask implements JavaDelegate {

    //重写委托的提交方法
    @Override
    public void execute(DelegateExecution execution) throws Exception {

        log.info("serviceTask已经执行已经执行！");
        Thread.sleep(10000);
        log.info("variavles=" + execution.getVariables());
        execution.setVariable("task1", "I am task 1");
        log.info("I am task 1.");
    }
}